﻿using Terraria.GameContent.Creative;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria;
using EAS.Common.Players;

namespace EAS.Content.Items
{
    public class CopperAmulet : ModItem
    {
        public override void SetStaticDefaults()
        {
            CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
        }
        public override void SetDefaults()
        {
            Item.width = 24;
            Item.height = 28;
            Item.rare = ItemRarityID.Blue;
            Item.accessory = true;
            Item.value = Item.sellPrice(0, 0, 25, 50);          
        }
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.statDefense += 2; 
            player.GetModPlayer<AccPlayer>().hasAmulet = true;
        }
        public override void AddRecipes()
        {
            CreateRecipe()
                .AddIngredient(ItemID.CopperBar, 5) 
                .AddIngredient(ItemID.Rope, 2)      
                .AddTile(TileID.Anvils)            
                .Register();
        }
    }
}
